package Prototype;
//浅复制
public class TestPrototype implements Cloneable{
    private final String name;
    private final String gender;

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    public TestPrototype(String name, String gender){
        this.name = name;
        this.gender = gender;
    }

    public String getName(){
        return name;
    }
    public void display(){
        System.out.println("imfo:"+name+" "+gender);
    }
}
